package com.itstudio.portal.controller;

import com.itstudio.portal.entity.RestResponse;
import com.itstudio.portal.entity.dto.UserQueryDto;
import com.itstudio.portal.service.UserDetailService;
import com.itstudio.portal.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:
 * @Author: zhaopengbo
 * @Date: 2024/11/23
 */
@RestController
@RequestMapping("/api/userDetail")
public class UserDetailController {
    @Autowired
    private UserDetailService userDetailService;
    //根据条件查询信息
    @GetMapping("/list")
    public RestResponse getUserDetailByConditioned(@RequestParam(defaultValue = "1") int pageNum,
                                                   @RequestParam(defaultValue = "10") int pageSize,
                                                   @ModelAttribute UserQueryDto userQueryDto){
        return userDetailService.selectUserDetailByCondition(pageNum,pageSize,userQueryDto);
    }
}
